// VectorFields1Dlg.h : header file
//

#pragma once
#include "afxwin.h"

#include "DrawableWidget.h"

#include "FloatVolGrid.h"

#include "ViewRotateYawPitch.h"
#include "RotationNode.h"

#include "SplineEditor.h"

#include "afxcmn.h"


// CVectorFields1Dlg dialog
class CVectorFields1Dlg : public CDialog, public ICustomCallback
{
// Construction
public:
	CVectorFields1Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_VECTORFIELDS1_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	// DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedCancel();

	// 
private:

	double m_lfTempLow, m_lfTempWidth;

	FloatVolGridRaw m_volGrid;
	FloatVolGridRaw m_gridToRender; // worry about a class to handle this
	// kind of grid relationship later, after you figure out more about it

	SplineEditor m_splineEditR, m_splineEditG, m_splineEditB, m_splineEditA;

	ViewRotateYawPitch m_viewRotate;

	VolumeViz m_volViz;

	RotationNode m_rotNode;
	
	CDrawableWidget m_drawWidget, m_drawWidgetSplineR, m_drawWidgetSplineG, m_drawWidgetSplineB, m_drawWidgetSplineA;

	void SetSlidersFromVolViz();
	void SetVolVizFromSliders();
	DECLARE_MESSAGE_MAP()

	
public:
	CSliderCtrl m_transferWidthSlider;
	CSliderCtrl m_transferOffSlider;
	afx_msg void OnNMReleasedcaptureSliderTransferOff(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMReleasedcaptureSliderTransferScale(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnStnClickedDrawWnd3();
	
	afx_msg void OnBnClickedButtonSetXferFun();
	afx_msg void OnEnChangeEditTempLow();
	afx_msg void OnEnChangeEditTempRange();
	CEdit m_editTempLow;
	CEdit m_editTempRange;
	CButton m_checkboxLinkDraw;

	virtual void DoCallback();

	
};
